OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2379 PrintF(" (%s->%s)#%s @ %p]\n", | 2379 PrintF(" (%s->%s)#%s @ %p]\n", |
2380 UnaryOpIC::GetName(previous_type), | 2380 UnaryOpIC::GetName(previous_type), |
2381 UnaryOpIC::GetName(type), | 2381 UnaryOpIC::GetName(type), |
2382 Token::Name(op), | 2382 Token::Name(op), |
2383 static_cast<void*>(*code)); | 2383 static_cast<void*>(*code)); |
2384 } | 2384 } |
2385 UnaryOpIC ic(isolate); | 2385 UnaryOpIC ic(isolate); |
2386 ic.patch(*code); | 2386 ic.patch(*code); |
2387 } | 2387 } |
2388 | 2388 |
2389 Handle<JSBuiltinsObject> builtins = Handle<JSBuiltinsObject>( | 2389 Handle<JSBuiltinsObject> builtins(isolate->js_builtins_object()); |
2390 isolate->thread_local_top()->context_->builtins(), isolate); | |
2391 Object* builtin = NULL; // Initialization calms down the compiler. | 2390 Object* builtin = NULL; // Initialization calms down the compiler. |
2392 switch (op) { | 2391 switch (op) { |
2393 case Token::SUB: | 2392 case Token::SUB: |
2394 builtin = builtins->javascript_builtin(Builtins::UNARY_MINUS); | 2393 builtin = builtins->javascript_builtin(Builtins::UNARY_MINUS); |
2395 break; | 2394 break; |
2396 case Token::BIT_NOT: | 2395 case Token::BIT_NOT: |
2397 builtin = builtins->javascript_builtin(Builtins::BIT_NOT); | 2396 builtin = builtins->javascript_builtin(Builtins::BIT_NOT); |
2398 break; | 2397 break; |
2399 default: | 2398 default: |
2400 UNREACHABLE(); | 2399 UNREACHABLE(); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2517 #endif | 2516 #endif |
2518 BinaryOpIC ic(isolate); | 2517 BinaryOpIC ic(isolate); |
2519 ic.patch(*code); | 2518 ic.patch(*code); |
2520 | 2519 |
2521 // Activate inlined smi code. | 2520 // Activate inlined smi code. |
2522 if (previous_overall == BinaryOpIC::UNINITIALIZED) { | 2521 if (previous_overall == BinaryOpIC::UNINITIALIZED) { |
2523 PatchInlinedSmiCode(ic.address(), ENABLE_INLINED_SMI_CHECK); | 2522 PatchInlinedSmiCode(ic.address(), ENABLE_INLINED_SMI_CHECK); |
2524 } | 2523 } |
2525 } | 2524 } |
2526 | 2525 |
2527 Handle<JSBuiltinsObject> builtins = Handle<JSBuiltinsObject>( | 2526 Handle<JSBuiltinsObject> builtins(isolate->js_builtins_object()); |
2528 isolate->thread_local_top()->context_->builtins(), isolate); | |
2529 Object* builtin = NULL; // Initialization calms down the compiler. | 2527 Object* builtin = NULL; // Initialization calms down the compiler. |
2530 switch (op) { | 2528 switch (op) { |
2531 case Token::ADD: | 2529 case Token::ADD: |
2532 builtin = builtins->javascript_builtin(Builtins::ADD); | 2530 builtin = builtins->javascript_builtin(Builtins::ADD); |
2533 break; | 2531 break; |
2534 case Token::SUB: | 2532 case Token::SUB: |
2535 builtin = builtins->javascript_builtin(Builtins::SUB); | 2533 builtin = builtins->javascript_builtin(Builtins::SUB); |
2536 break; | 2534 break; |
2537 case Token::MUL: | 2535 case Token::MUL: |
2538 builtin = builtins->javascript_builtin(Builtins::MUL); | 2536 builtin = builtins->javascript_builtin(Builtins::MUL); |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2800 #undef ADDR | 2798 #undef ADDR |
2801 }; | 2799 }; |
2802 | 2800 |
2803 | 2801 |
2804 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2802 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2805 return IC_utilities[id]; | 2803 return IC_utilities[id]; |
2806 } | 2804 } |
2807 | 2805 |
2808 | 2806 |
2809 } } // namespace v8::internal | 2807 } } // namespace v8::internal |
OLD | NEW |