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

Unified Diff: src/objects.h

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 side-by-side diff with in-line comments
Download patch
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index dd43f0fe5b08df6f813d7fabd23ed9880c8d1a33..a31e5203226d55f7d64deab2fc428899429c50f4 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -1102,8 +1102,7 @@ class Object {
Handle<Object> input, ToPrimitiveHint hint = ToPrimitiveHint::kDefault);
// ES6 section 7.1.3 ToNumber
- MUST_USE_RESULT static MaybeHandle<Object> ToNumber(Isolate* isolate,
- Handle<Object> input);
+ MUST_USE_RESULT static MaybeHandle<Object> ToNumber(Handle<Object> input);
// ES6 section 7.1.12 ToString
MUST_USE_RESULT static MaybeHandle<String> ToString(Isolate* isolate,
@@ -1116,6 +1115,47 @@ class Object {
// ES6 section 12.5.6 The typeof Operator
static Handle<String> TypeOf(Isolate* isolate, Handle<Object> object);
+ // ES6 section 12.6 Multiplicative Operators
+ MUST_USE_RESULT static MaybeHandle<Object> Multiply(
+ Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs,
+ Strength strength = Strength::WEAK);
+ MUST_USE_RESULT static MaybeHandle<Object> Divide(
+ Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs,
+ Strength strength = Strength::WEAK);
+ MUST_USE_RESULT static MaybeHandle<Object> Modulus(
+ Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs,
+ Strength strength = Strength::WEAK);
+
+ // ES6 section 12.7 Additive Operators
+ MUST_USE_RESULT static MaybeHandle<Object> Add(
+ Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs,
+ Strength strength = Strength::WEAK);
+ MUST_USE_RESULT static MaybeHandle<Object> Subtract(
+ Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs,
+ Strength strength = Strength::WEAK);
+
+ // ES6 section 12.8 Bitwise Shift Operators
+ MUST_USE_RESULT static MaybeHandle<Object> ShiftLeft(
+ Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs,
+ Strength strength = Strength::WEAK);
+ MUST_USE_RESULT static MaybeHandle<Object> ShiftRight(
+ Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs,
+ Strength strength = Strength::WEAK);
+ MUST_USE_RESULT static MaybeHandle<Object> ShiftRightLogical(
+ Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs,
+ Strength strength = Strength::WEAK);
+
+ // ES6 section 12.11 Binary Bitwise Operators
+ MUST_USE_RESULT static MaybeHandle<Object> BitwiseAnd(
+ Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs,
+ Strength strength = Strength::WEAK);
+ MUST_USE_RESULT static MaybeHandle<Object> BitwiseOr(
+ Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs,
+ Strength strength = Strength::WEAK);
+ MUST_USE_RESULT static MaybeHandle<Object> BitwiseXor(
+ Isolate* isolate, Handle<Object> lhs, Handle<Object> rhs,
+ Strength strength = Strength::WEAK);
+
MUST_USE_RESULT static MaybeHandle<Object> GetProperty(
LookupIterator* it, LanguageMode language_mode = SLOPPY);

Powered by Google App Engine
This is Rietveld 408576698