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

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

Issue 1333843002: [runtime] Move binary operator fallbacks into the runtime. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: No need for frame states in bytecode handlers. Add test case. 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
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 "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/bootstrapper.h" 8 #include "src/bootstrapper.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 isolate, result, Object::ToPrimitive(input, ToPrimitiveHint::kString)); 1451 isolate, result, Object::ToPrimitive(input, ToPrimitiveHint::kString));
1452 return *result; 1452 return *result;
1453 } 1453 }
1454 1454
1455 1455
1456 RUNTIME_FUNCTION(Runtime_ToNumber) { 1456 RUNTIME_FUNCTION(Runtime_ToNumber) {
1457 HandleScope scope(isolate); 1457 HandleScope scope(isolate);
1458 DCHECK_EQ(1, args.length()); 1458 DCHECK_EQ(1, args.length());
1459 CONVERT_ARG_HANDLE_CHECKED(Object, input, 0); 1459 CONVERT_ARG_HANDLE_CHECKED(Object, input, 0);
1460 Handle<Object> result; 1460 Handle<Object> result;
1461 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, 1461 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, Object::ToNumber(input));
1462 Object::ToNumber(isolate, input));
1463 return *result; 1462 return *result;
1464 } 1463 }
1465 1464
1466 1465
1467 RUNTIME_FUNCTION(Runtime_ToString) { 1466 RUNTIME_FUNCTION(Runtime_ToString) {
1468 HandleScope scope(isolate); 1467 HandleScope scope(isolate);
1469 DCHECK_EQ(1, args.length()); 1468 DCHECK_EQ(1, args.length());
1470 CONVERT_ARG_HANDLE_CHECKED(Object, input, 0); 1469 CONVERT_ARG_HANDLE_CHECKED(Object, input, 0);
1471 Handle<Object> result; 1470 Handle<Object> result;
1472 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, 1471 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 RUNTIME_FUNCTION(Runtime_CreateIterResultObject) { 1553 RUNTIME_FUNCTION(Runtime_CreateIterResultObject) {
1555 HandleScope scope(isolate); 1554 HandleScope scope(isolate);
1556 DCHECK_EQ(2, args.length()); 1555 DCHECK_EQ(2, args.length());
1557 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); 1556 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0);
1558 CONVERT_ARG_HANDLE_CHECKED(Object, done, 1); 1557 CONVERT_ARG_HANDLE_CHECKED(Object, done, 1);
1559 return *isolate->factory()->NewJSIteratorResult(value, done); 1558 return *isolate->factory()->NewJSIteratorResult(value, done);
1560 } 1559 }
1561 1560
1562 } // namespace internal 1561 } // namespace internal
1563 } // namespace v8 1562 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698