| Index: runtime/vm/simulator_dbc.cc
|
| diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
|
| index 4789edc6d93c188285f405d3c6787099dd1c698b..5a26b539dea296333fab5916469abdfedf47d68b 100644
|
| --- a/runtime/vm/simulator_dbc.cc
|
| +++ b/runtime/vm/simulator_dbc.cc
|
| @@ -28,6 +28,7 @@
|
| #include "vm/object_store.h"
|
| #include "vm/os_thread.h"
|
| #include "vm/stack_frame.h"
|
| +#include "vm/symbols.h"
|
|
|
| namespace dart {
|
|
|
| @@ -1525,6 +1526,28 @@ RawObject* Simulator::Call(const Code& code,
|
| }
|
|
|
| {
|
| + BYTECODE(OneByteStringFromCharCode, A_X);
|
| + const intptr_t char_code = Smi::Value(RAW_CAST(Smi, FP[rD]));
|
| + ASSERT(char_code >= 0);
|
| + ASSERT(char_code <= 255);
|
| + RawString** strings = Symbols::PredefinedAddress();
|
| + const intptr_t index = char_code + Symbols::kNullCharCodeSymbolOffset;
|
| + FP[rA] = strings[index];
|
| + DISPATCH();
|
| + }
|
| +
|
| + {
|
| + BYTECODE(StringToCharCode, A_X);
|
| + RawOneByteString* str = RAW_CAST(OneByteString, FP[rD]);
|
| + if (str->ptr()->length_ == Smi::New(1)) {
|
| + FP[rA] = Smi::New(str->ptr()->data()[0]);
|
| + } else {
|
| + FP[rA] = Smi::New(-1);
|
| + }
|
| + DISPATCH();
|
| + }
|
| +
|
| + {
|
| BYTECODE(AddTOS, A_B_C);
|
| SMI_FASTPATH_TOS(intptr_t, SignedAddWithOverflow);
|
| DISPATCH();
|
|
|