OLD | NEW |
---|---|
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 // TODO(rmcilroy): Remove this define after this flag is turned on globally | 5 // TODO(rmcilroy): Remove this define after this flag is turned on globally |
6 #define V8_IMMINENT_DEPRECATION_WARNINGS | 6 #define V8_IMMINENT_DEPRECATION_WARNINGS |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/execution.h" | 10 #include "src/execution.h" |
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1237 | 1237 |
1238 Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(); | 1238 Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray(); |
1239 InterpreterTester tester(handles.main_isolate(), bytecode_array); | 1239 InterpreterTester tester(handles.main_isolate(), bytecode_array); |
1240 auto callable = tester.GetCallable<>(); | 1240 auto callable = tester.GetCallable<>(); |
1241 Handle<Object> return_value = callable().ToHandleChecked(); | 1241 Handle<Object> return_value = callable().ToHandleChecked(); |
1242 CHECK_EQ(Smi::cast(*return_value)->value(), 7); | 1242 CHECK_EQ(Smi::cast(*return_value)->value(), 7); |
1243 } | 1243 } |
1244 | 1244 |
1245 | 1245 |
1246 static const Token::Value kComparisonTypes[] = { | 1246 static const Token::Value kComparisonTypes[] = { |
1247 Token::Value::EQ, Token::Value::NE, Token::Value::EQ_STRICT, | 1247 Token::Value::EQ, Token::Value::NE, Token::Value::EQ_STRICT, |
1248 Token::Value::NE_STRICT, Token::Value::LTE, Token::Value::LTE, | 1248 Token::Value::NE_STRICT, Token::Value::LT, Token::Value::LTE, |
oth
2015/11/25 14:18:33
Good catch.
| |
1249 Token::Value::GT, Token::Value::GTE}; | 1249 Token::Value::GT, Token::Value::GTE}; |
1250 | 1250 |
1251 | 1251 |
1252 template <typename T> | 1252 template <typename T> |
1253 bool CompareC(Token::Value op, T lhs, T rhs, bool types_differed = false) { | 1253 bool CompareC(Token::Value op, T lhs, T rhs, bool types_differed = false) { |
1254 switch (op) { | 1254 switch (op) { |
1255 case Token::Value::EQ: | 1255 case Token::Value::EQ: |
1256 return lhs == rhs; | 1256 return lhs == rhs; |
1257 case Token::Value::NE: | 1257 case Token::Value::NE: |
1258 return lhs != rhs; | 1258 return lhs != rhs; |
(...skipping 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3087 callable(handle(Smi::FromInt(arg_value), handles.main_isolate())) | 3087 callable(handle(Smi::FromInt(arg_value), handles.main_isolate())) |
3088 .ToHandleChecked(); | 3088 .ToHandleChecked(); |
3089 CHECK_EQ(Handle<Smi>::cast(return_val)->value(), samples[i].second); | 3089 CHECK_EQ(Handle<Smi>::cast(return_val)->value(), samples[i].second); |
3090 } | 3090 } |
3091 } | 3091 } |
3092 | 3092 |
3093 | 3093 |
3094 } // namespace interpreter | 3094 } // namespace interpreter |
3095 } // namespace internal | 3095 } // namespace internal |
3096 } // namespace v8 | 3096 } // namespace v8 |
OLD | NEW |