Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: src/messages.cc

Issue 1608523002: [runtime] Do not use the enum-cache for non-prototype objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: signed unsigned missmatch Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/key-accumulator.cc ('k') | src/objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/messages.h" 5 #include "src/messages.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/execution.h" 8 #include "src/execution.h"
9 #include "src/isolate-inl.h" 9 #include "src/isolate-inl.h"
10 #include "src/string-builder.h" 10 #include "src/string-builder.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 HandleScope outer_scope(isolate_); 244 HandleScope outer_scope(isolate_);
245 Handle<Object> result; 245 Handle<Object> result;
246 for (PrototypeIterator iter(isolate_, obj, 246 for (PrototypeIterator iter(isolate_, obj,
247 PrototypeIterator::START_AT_RECEIVER); 247 PrototypeIterator::START_AT_RECEIVER);
248 !iter.IsAtEnd(); iter.Advance()) { 248 !iter.IsAtEnd(); iter.Advance()) {
249 Handle<Object> current = PrototypeIterator::GetCurrent(iter); 249 Handle<Object> current = PrototypeIterator::GetCurrent(iter);
250 if (!current->IsJSObject()) break; 250 if (!current->IsJSObject()) break;
251 Handle<JSObject> current_obj = Handle<JSObject>::cast(current); 251 Handle<JSObject> current_obj = Handle<JSObject>::cast(current);
252 if (current_obj->IsAccessCheckNeeded()) break; 252 if (current_obj->IsAccessCheckNeeded()) break;
253 Handle<FixedArray> keys = JSObject::GetEnumPropertyKeys(current_obj, false); 253 Handle<FixedArray> keys =
254 JSObject::GetOwnEnumPropertyKeys(current_obj, false);
254 for (int i = 0; i < keys->length(); i++) { 255 for (int i = 0; i < keys->length(); i++) {
255 HandleScope inner_scope(isolate_); 256 HandleScope inner_scope(isolate_);
256 if (!keys->get(i)->IsName()) continue; 257 if (!keys->get(i)->IsName()) continue;
257 Handle<Name> name_key(Name::cast(keys->get(i)), isolate_); 258 Handle<Name> name_key(Name::cast(keys->get(i)), isolate_);
258 if (!CheckMethodName(isolate_, current_obj, name_key, fun_, 259 if (!CheckMethodName(isolate_, current_obj, name_key, fun_,
259 LookupIterator::OWN_SKIP_INTERCEPTOR)) 260 LookupIterator::OWN_SKIP_INTERCEPTOR))
260 continue; 261 continue;
261 // Return null in case of duplicates to avoid confusion. 262 // Return null in case of duplicates to avoid confusion.
262 if (!result.is_null()) return isolate_->factory()->null_value(); 263 if (!result.is_null()) return isolate_->factory()->null_value();
263 result = inner_scope.CloseAndEscape(name_key); 264 result = inner_scope.CloseAndEscape(name_key);
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 builder.AppendCharacter(*c); 401 builder.AppendCharacter(*c);
401 } 402 }
402 } 403 }
403 404
404 return builder.Finish(); 405 return builder.Finish();
405 } 406 }
406 407
407 408
408 } // namespace internal 409 } // namespace internal
409 } // namespace v8 410 } // namespace v8
OLDNEW
« no previous file with comments | « src/key-accumulator.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698