OLD | NEW |
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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 | 373 |
374 if (key->ToArrayIndex(&index)) { | 374 if (key->ToArrayIndex(&index)) { |
375 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 375 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
376 isolate, result, LoadElementFromSuper(isolate, receiver, home_object, | 376 isolate, result, LoadElementFromSuper(isolate, receiver, home_object, |
377 index, language_mode)); | 377 index, language_mode)); |
378 return *result; | 378 return *result; |
379 } | 379 } |
380 | 380 |
381 Handle<Name> name; | 381 Handle<Name> name; |
382 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, name, | 382 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, name, |
383 Runtime::ToName(isolate, key)); | 383 Object::ToName(isolate, key)); |
384 // TODO(verwaest): Unify using LookupIterator. | 384 // TODO(verwaest): Unify using LookupIterator. |
385 if (name->AsArrayIndex(&index)) { | 385 if (name->AsArrayIndex(&index)) { |
386 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 386 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
387 isolate, result, LoadElementFromSuper(isolate, receiver, home_object, | 387 isolate, result, LoadElementFromSuper(isolate, receiver, home_object, |
388 index, language_mode)); | 388 index, language_mode)); |
389 return *result; | 389 return *result; |
390 } | 390 } |
391 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 391 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
392 isolate, result, | 392 isolate, result, |
393 LoadFromSuper(isolate, receiver, home_object, name, language_mode)); | 393 LoadFromSuper(isolate, receiver, home_object, name, language_mode)); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 Handle<Object> value, | 470 Handle<Object> value, |
471 LanguageMode language_mode) { | 471 LanguageMode language_mode) { |
472 uint32_t index = 0; | 472 uint32_t index = 0; |
473 | 473 |
474 if (key->ToArrayIndex(&index)) { | 474 if (key->ToArrayIndex(&index)) { |
475 return StoreElementToSuper(isolate, home_object, receiver, index, value, | 475 return StoreElementToSuper(isolate, home_object, receiver, index, value, |
476 language_mode); | 476 language_mode); |
477 } | 477 } |
478 Handle<Name> name; | 478 Handle<Name> name; |
479 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, name, | 479 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, name, |
480 Runtime::ToName(isolate, key)); | 480 Object::ToName(isolate, key)); |
481 // TODO(verwaest): Unify using LookupIterator. | 481 // TODO(verwaest): Unify using LookupIterator. |
482 if (name->AsArrayIndex(&index)) { | 482 if (name->AsArrayIndex(&index)) { |
483 return StoreElementToSuper(isolate, home_object, receiver, index, value, | 483 return StoreElementToSuper(isolate, home_object, receiver, index, value, |
484 language_mode); | 484 language_mode); |
485 } | 485 } |
486 return StoreToSuper(isolate, home_object, receiver, name, value, | 486 return StoreToSuper(isolate, home_object, receiver, name, value, |
487 language_mode); | 487 language_mode); |
488 } | 488 } |
489 | 489 |
490 | 490 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 Handle<Object> result; | 557 Handle<Object> result; |
558 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 558 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
559 isolate, result, | 559 isolate, result, |
560 Execution::Call(isolate, reflect, isolate->factory()->undefined_value(), | 560 Execution::Call(isolate, reflect, isolate->factory()->undefined_value(), |
561 arraysize(argv), argv)); | 561 arraysize(argv), argv)); |
562 | 562 |
563 return *result; | 563 return *result; |
564 } | 564 } |
565 } // namespace internal | 565 } // namespace internal |
566 } // namespace v8 | 566 } // namespace v8 |
OLD | NEW |