| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2570 } | 2570 } |
| 2571 | 2571 |
| 2572 | 2572 |
| 2573 void FullCodeGenerator::EmitGetFromCache(ZoneList<Expression*>* args) { | 2573 void FullCodeGenerator::EmitGetFromCache(ZoneList<Expression*>* args) { |
| 2574 ASSERT_EQ(2, args->length()); | 2574 ASSERT_EQ(2, args->length()); |
| 2575 | 2575 |
| 2576 ASSERT_NE(NULL, args->at(0)->AsLiteral()); | 2576 ASSERT_NE(NULL, args->at(0)->AsLiteral()); |
| 2577 int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->handle()))->value(); | 2577 int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->handle()))->value(); |
| 2578 | 2578 |
| 2579 Handle<FixedArray> jsfunction_result_caches( | 2579 Handle<FixedArray> jsfunction_result_caches( |
| 2580 Top::global_context()->jsfunction_result_caches()); | 2580 Isolate::Current()->global_context()->jsfunction_result_caches()); |
| 2581 if (jsfunction_result_caches->length() <= cache_id) { | 2581 if (jsfunction_result_caches->length() <= cache_id) { |
| 2582 __ Abort("Attempt to use undefined cache."); | 2582 __ Abort("Attempt to use undefined cache."); |
| 2583 __ LoadRoot(rax, Heap::kUndefinedValueRootIndex); | 2583 __ LoadRoot(rax, Heap::kUndefinedValueRootIndex); |
| 2584 Apply(context_, rax); | 2584 Apply(context_, rax); |
| 2585 return; | 2585 return; |
| 2586 } | 2586 } |
| 2587 | 2587 |
| 2588 VisitForValue(args->at(1), kAccumulator); | 2588 VisitForValue(args->at(1), kAccumulator); |
| 2589 | 2589 |
| 2590 Register key = rax; | 2590 Register key = rax; |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3240 __ ret(0); | 3240 __ ret(0); |
| 3241 } | 3241 } |
| 3242 | 3242 |
| 3243 | 3243 |
| 3244 #undef __ | 3244 #undef __ |
| 3245 | 3245 |
| 3246 | 3246 |
| 3247 } } // namespace v8::internal | 3247 } } // namespace v8::internal |
| 3248 | 3248 |
| 3249 #endif // V8_TARGET_ARCH_X64 | 3249 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |