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

Unified Diff: test/cctest/interpreter/test-interpreter.cc

Issue 1385623002: [Interpreter]: Add support for strict mode load / store ICs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: test/cctest/interpreter/test-interpreter.cc
diff --git a/test/cctest/interpreter/test-interpreter.cc b/test/cctest/interpreter/test-interpreter.cc
index deeb0baafd978e3f175639af8ccc47575ab8af13..21011ea7c5a0ca3830e2367020a5ef13911231a3 100644
--- a/test/cctest/interpreter/test-interpreter.cc
+++ b/test/cctest/interpreter/test-interpreter.cc
@@ -391,7 +391,7 @@ TEST(InterpreterBinaryOpsSmi) {
builder.LoadLiteral(Smi::FromInt(lhs))
.StoreAccumulatorInRegister(reg)
.LoadLiteral(Smi::FromInt(rhs))
- .BinaryOperation(kArithmeticOperators[o], reg)
+ .BinaryOperation(kArithmeticOperators[o], reg, i::SLOPPY)
.Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
@@ -426,7 +426,7 @@ TEST(InterpreterBinaryOpsHeapNumber) {
builder.LoadLiteral(factory->NewNumber(lhs))
.StoreAccumulatorInRegister(reg)
.LoadLiteral(factory->NewNumber(rhs))
- .BinaryOperation(kArithmeticOperators[o], reg)
+ .BinaryOperation(kArithmeticOperators[o], reg, i::SLOPPY)
.Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
@@ -482,7 +482,7 @@ TEST(InterpreterStringAdd) {
builder.LoadLiteral(test_cases[i].lhs)
.StoreAccumulatorInRegister(reg)
.LoadLiteral(test_cases[i].rhs)
- .BinaryOperation(Token::Value::ADD, reg)
+ .BinaryOperation(Token::Value::ADD, reg, i::SLOPPY)
.Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
@@ -523,13 +523,13 @@ TEST(InterpreterParameter8) {
builder.set_locals_count(0);
builder.set_parameter_count(8);
builder.LoadAccumulatorWithRegister(builder.Parameter(0))
- .BinaryOperation(Token::Value::ADD, builder.Parameter(1))
- .BinaryOperation(Token::Value::ADD, builder.Parameter(2))
- .BinaryOperation(Token::Value::ADD, builder.Parameter(3))
- .BinaryOperation(Token::Value::ADD, builder.Parameter(4))
- .BinaryOperation(Token::Value::ADD, builder.Parameter(5))
- .BinaryOperation(Token::Value::ADD, builder.Parameter(6))
- .BinaryOperation(Token::Value::ADD, builder.Parameter(7))
+ .BinaryOperation(Token::Value::ADD, builder.Parameter(1), i::SLOPPY)
+ .BinaryOperation(Token::Value::ADD, builder.Parameter(2), i::SLOPPY)
+ .BinaryOperation(Token::Value::ADD, builder.Parameter(3), i::SLOPPY)
+ .BinaryOperation(Token::Value::ADD, builder.Parameter(4), i::SLOPPY)
+ .BinaryOperation(Token::Value::ADD, builder.Parameter(5), i::SLOPPY)
+ .BinaryOperation(Token::Value::ADD, builder.Parameter(6), i::SLOPPY)
+ .BinaryOperation(Token::Value::ADD, builder.Parameter(7), i::SLOPPY)
.Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
@@ -663,7 +663,7 @@ TEST(InterpreterLoadKeyedProperty) {
builder.set_parameter_count(1);
builder.LoadLiteral(key)
.LoadKeyedProperty(builder.Parameter(0), vector->GetIndex(slot),
- i::SLOPPY)
+ i::STRICT)
.Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
@@ -709,7 +709,7 @@ TEST(InterpreterStoreNamedProperty) {
.StoreAccumulatorInRegister(Register(0))
.LoadLiteral(Smi::FromInt(999))
.StoreNamedProperty(builder.Parameter(0), Register(0),
- vector->GetIndex(slot), i::SLOPPY)
+ vector->GetIndex(slot), i::STRICT)
.Return();
Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
@@ -955,7 +955,7 @@ static BytecodeArrayBuilder& IncrementRegister(BytecodeArrayBuilder& builder,
Register scratch) {
return builder.StoreAccumulatorInRegister(scratch)
.LoadLiteral(Smi::FromInt(value))
- .BinaryOperation(Token::Value::ADD, reg)
+ .BinaryOperation(Token::Value::ADD, reg, i::SLOPPY)
.StoreAccumulatorInRegister(reg)
.LoadAccumulatorWithRegister(scratch);
}

Powered by Google App Engine
This is Rietveld 408576698