1
0
Fork 0

fast path for named property access

This commit is contained in:
Jan Steemann 2014-05-28 21:35:42 +02:00
parent 57d0d4a5ca
commit 350e8fc8fe
1 changed files with 3 additions and 1 deletions

View File

@ -9870,7 +9870,9 @@ static v8::Handle<v8::Value> MapGetNamedShapedJson (v8::Local<v8::String> name,
}
// convert the JavaScript string to a string
string const key = TRI_ObjectToString(name);
// we take the fast path here and don't normalize the string
v8::String::Utf8Value const str(name);
string const key(*str, (size_t) str.length());
if (key.empty() || key[0] == '_' || strchr(key.c_str(), '.') != 0) {
return scope.Close(v8::Handle<v8::Value>());