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

Side by Side Diff: src/runtime/runtime-object.cc

Issue 649603003: Keyed stores to super with numeric keys. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Refactoring of GetElementAttributeWithInterceptor Created 6 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/debug.h" 9 #include "src/debug.h"
10 #include "src/runtime/runtime.h" 10 #include "src/runtime/runtime.h"
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 // LookupIterator. 416 // LookupIterator.
417 if (name->AsArrayIndex(&index)) { 417 if (name->AsArrayIndex(&index)) {
418 // Get attributes. 418 // Get attributes.
419 Maybe<PropertyAttributes> maybe = 419 Maybe<PropertyAttributes> maybe =
420 JSReceiver::GetOwnElementAttribute(obj, index); 420 JSReceiver::GetOwnElementAttribute(obj, index);
421 if (!maybe.has_value) return MaybeHandle<Object>(); 421 if (!maybe.has_value) return MaybeHandle<Object>();
422 attrs = maybe.value; 422 attrs = maybe.value;
423 if (attrs == ABSENT) return factory->undefined_value(); 423 if (attrs == ABSENT) return factory->undefined_value();
424 424
425 // Get AccessorPair if present. 425 // Get AccessorPair if present.
426 maybe_accessors = JSObject::GetOwnElementAccessorPair(obj, index); 426 Handle<Object> structure;
427 if (JSObject::GetOwnElementStructure(obj, index).ToHandle(&structure) &&
428 structure->IsAccessorPair()) {
429 maybe_accessors = Handle<AccessorPair>::cast(structure);
430 }
427 431
428 // Get value if not an AccessorPair. 432 // Get value if not an AccessorPair.
429 if (maybe_accessors.is_null()) { 433 if (maybe_accessors.is_null()) {
430 ASSIGN_RETURN_ON_EXCEPTION( 434 ASSIGN_RETURN_ON_EXCEPTION(
431 isolate, value, Runtime::GetElementOrCharAt(isolate, obj, index), 435 isolate, value, Runtime::GetElementOrCharAt(isolate, obj, index),
432 Object); 436 Object);
433 } 437 }
434 } else { 438 } else {
435 // Get attributes. 439 // Get attributes.
436 LookupIterator it(obj, name, LookupIterator::HIDDEN); 440 LookupIterator it(obj, name, LookupIterator::HIDDEN);
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1633 1637
1634 RUNTIME_FUNCTION(RuntimeReference_ClassOf) { 1638 RUNTIME_FUNCTION(RuntimeReference_ClassOf) {
1635 SealHandleScope shs(isolate); 1639 SealHandleScope shs(isolate);
1636 DCHECK(args.length() == 1); 1640 DCHECK(args.length() == 1);
1637 CONVERT_ARG_CHECKED(Object, obj, 0); 1641 CONVERT_ARG_CHECKED(Object, obj, 0);
1638 if (!obj->IsJSReceiver()) return isolate->heap()->null_value(); 1642 if (!obj->IsJSReceiver()) return isolate->heap()->null_value();
1639 return JSReceiver::cast(obj)->class_name(); 1643 return JSReceiver::cast(obj)->class_name();
1640 } 1644 }
1641 } 1645 }
1642 } // namespace v8::internal 1646 } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698