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

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

Issue 1306043003: Move runtime helper for ToName conversion onto Object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-heap-friends
Patch Set: Minor fixup. Created 5 years, 3 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/runtime/runtime.h ('k') | src/runtime/runtime-forin.cc » ('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 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
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
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
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
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | src/runtime/runtime-forin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698