Index: src/interpreter/bytecode-array-builder.cc |
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc |
index 594d8faa25e02dec182eae96e94f802eaa01dd58..1d97f0743e70c0a9e38c2102f233bccd638fdc44 100644 |
--- a/src/interpreter/bytecode-array-builder.cc |
+++ b/src/interpreter/bytecode-array-builder.cc |
@@ -529,11 +529,12 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArguments( |
BytecodeArrayBuilder& BytecodeArrayBuilder::CreateRegExpLiteral( |
- int literal_index, int flags) { |
+ Handle<String> pattern, int literal_index, int flags) { |
DCHECK(FitsInImm8Operand(flags)); // Flags should fit in 8 bits. |
- if (FitsInIdx8Operand(literal_index)) { |
- Output(Bytecode::kCreateRegExpLiteral, static_cast<uint8_t>(literal_index), |
- static_cast<uint8_t>(flags)); |
+ size_t pattern_entry = GetConstantPoolEntry(pattern); |
+ if (FitsInIdx8Operand(literal_index) && FitsInIdx8Operand(pattern_entry)) { |
+ Output(Bytecode::kCreateRegExpLiteral, static_cast<uint8_t>(pattern_entry), |
+ static_cast<uint8_t>(literal_index), static_cast<uint8_t>(flags)); |
} else { |
rmcilroy
2015/12/07 14:33:22
Are you adding wide variants in this CL or a subse
mythria
2015/12/07 15:11:18
Added wide variants with patchset2.
|
UNIMPLEMENTED(); |
} |
@@ -542,11 +543,14 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CreateRegExpLiteral( |
BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArrayLiteral( |
- int literal_index, int flags) { |
+ Handle<FixedArray> constant_elements, int literal_index, int flags) { |
DCHECK(FitsInImm8Operand(flags)); // Flags should fit in 8 bits. |
- if (FitsInIdx8Operand(literal_index)) { |
- Output(Bytecode::kCreateArrayLiteral, static_cast<uint8_t>(literal_index), |
- static_cast<uint8_t>(flags)); |
+ size_t cons_element_entry = GetConstantPoolEntry(constant_elements); |
rmcilroy
2015/12/07 14:33:22
don't abbreviate (cons_element_entry -> constant_e
mythria
2015/12/07 15:11:18
Done.
|
+ if (FitsInIdx8Operand(literal_index) && |
+ FitsInIdx8Operand(cons_element_entry)) { |
+ Output(Bytecode::kCreateArrayLiteral, |
+ static_cast<uint8_t>(cons_element_entry), |
+ static_cast<uint8_t>(literal_index), static_cast<uint8_t>(flags)); |
} else { |
UNIMPLEMENTED(); |
} |
@@ -555,11 +559,14 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::CreateArrayLiteral( |
BytecodeArrayBuilder& BytecodeArrayBuilder::CreateObjectLiteral( |
- int literal_index, int flags) { |
+ Handle<FixedArray> constant_properties, int literal_index, int flags) { |
DCHECK(FitsInImm8Operand(flags)); // Flags should fit in 8 bits. |
- if (FitsInIdx8Operand(literal_index)) { |
- Output(Bytecode::kCreateObjectLiteral, static_cast<uint8_t>(literal_index), |
- static_cast<uint8_t>(flags)); |
+ size_t cons_property_entry = GetConstantPoolEntry(constant_properties); |
rmcilroy
2015/12/07 14:33:22
ditto
mythria
2015/12/07 15:11:18
Done.
|
+ if (FitsInIdx8Operand(literal_index) && |
+ FitsInIdx8Operand(cons_property_entry)) { |
+ Output(Bytecode::kCreateObjectLiteral, |
+ static_cast<uint8_t>(cons_property_entry), |
+ static_cast<uint8_t>(literal_index), static_cast<uint8_t>(flags)); |
} else { |
UNIMPLEMENTED(); |
} |