OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/bailout-reason.h" | 7 #include "src/bailout-reason.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/field-index.h" | 9 #include "src/field-index.h" |
10 #include "src/hydrogen.h" | 10 #include "src/hydrogen.h" |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 HConstant* js_function_proxy = | 382 HConstant* js_function_proxy = |
383 Add<HConstant>(JS_FUNCTION_PROXY_TYPE); | 383 Add<HConstant>(JS_FUNCTION_PROXY_TYPE); |
384 is_function.If<HCompareNumericAndBranch>(instance_type, js_function, | 384 is_function.If<HCompareNumericAndBranch>(instance_type, js_function, |
385 Token::EQ); | 385 Token::EQ); |
386 is_function.OrIf<HCompareNumericAndBranch>( | 386 is_function.OrIf<HCompareNumericAndBranch>( |
387 instance_type, js_function_proxy, Token::EQ); | 387 instance_type, js_function_proxy, Token::EQ); |
388 is_function.Then(); | 388 is_function.Then(); |
389 { Push(Add<HConstant>(factory->function_string())); } | 389 { Push(Add<HConstant>(factory->function_string())); } |
390 is_function.Else(); | 390 is_function.Else(); |
391 { | 391 { |
392 // Is it an undetectable object? | 392 IfBuilder is_float32x4(this); |
393 IfBuilder is_undetectable(this); | 393 is_float32x4.If<HCompareNumericAndBranch>( |
394 is_undetectable.If<HIsUndetectableAndBranch>(object); | 394 instance_type, Add<HConstant>(FLOAT32X4_TYPE), Token::EQ); |
395 is_undetectable.Then(); | 395 is_float32x4.Then(); |
| 396 { Push(Add<HConstant>(factory->float32x4_string())); } |
| 397 is_float32x4.Else(); |
396 { | 398 { |
397 // typeof an undetectable object is 'undefined'. | 399 // Is it an undetectable object? |
398 Push(undefined_string); | 400 IfBuilder is_undetectable(this); |
399 } | 401 is_undetectable.If<HIsUndetectableAndBranch>(object); |
400 is_undetectable.Else(); | 402 is_undetectable.Then(); |
401 { | 403 { |
402 // For any kind of object not handled above, the spec rule for | 404 // typeof an undetectable object is 'undefined'. |
403 // host objects gives that it is okay to return "object". | 405 Push(undefined_string); |
404 Push(object_string); | 406 } |
| 407 is_undetectable.Else(); |
| 408 { |
| 409 // For any kind of object not handled above, the spec rule for |
| 410 // host objects gives that it is okay to return "object". |
| 411 Push(object_string); |
| 412 } |
405 } | 413 } |
406 } | 414 } |
407 is_function.End(); | 415 is_function.End(); |
408 } | 416 } |
409 is_symbol.End(); | 417 is_symbol.End(); |
410 } | 418 } |
411 is_oddball.End(); | 419 is_oddball.End(); |
412 } | 420 } |
413 is_string.End(); | 421 is_string.End(); |
414 } | 422 } |
(...skipping 1850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2265 return Pop(); | 2273 return Pop(); |
2266 } | 2274 } |
2267 | 2275 |
2268 | 2276 |
2269 Handle<Code> KeyedLoadGenericStub::GenerateCode() { | 2277 Handle<Code> KeyedLoadGenericStub::GenerateCode() { |
2270 return DoGenerateCode(this); | 2278 return DoGenerateCode(this); |
2271 } | 2279 } |
2272 | 2280 |
2273 } // namespace internal | 2281 } // namespace internal |
2274 } // namespace v8 | 2282 } // namespace v8 |
OLD | NEW |