| 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 5342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5353 ASSERT(var->is_global()); | 5353 ASSERT(var->is_global()); |
| 5354 ASSERT(!in_safe_int32_mode()); | 5354 ASSERT(!in_safe_int32_mode()); |
| 5355 Reference ref(this, node); | 5355 Reference ref(this, node); |
| 5356 ref.GetValue(); | 5356 ref.GetValue(); |
| 5357 } | 5357 } |
| 5358 } | 5358 } |
| 5359 | 5359 |
| 5360 | 5360 |
| 5361 void CodeGenerator::VisitLiteral(Literal* node) { | 5361 void CodeGenerator::VisitLiteral(Literal* node) { |
| 5362 Comment cmnt(masm_, "[ Literal"); | 5362 Comment cmnt(masm_, "[ Literal"); |
| 5363 if (in_safe_int32_mode()) { | 5363 if (frame_->ConstantPoolOverflowed()) { |
| 5364 frame_->PushUntaggedElement(node->handle()); | 5364 Result temp = allocator_->Allocate(); |
| 5365 ASSERT(temp.is_valid()); |
| 5366 if (in_safe_int32_mode()) { |
| 5367 temp.set_untagged_int32(true); |
| 5368 } |
| 5369 __ Set(temp.reg(), Immediate(node->handle())); |
| 5370 frame_->Push(&temp); |
| 5365 } else { | 5371 } else { |
| 5366 frame_->Push(node->handle()); | 5372 if (in_safe_int32_mode()) { |
| 5373 frame_->PushUntaggedElement(node->handle()); |
| 5374 } else { |
| 5375 frame_->Push(node->handle()); |
| 5376 } |
| 5367 } | 5377 } |
| 5368 } | 5378 } |
| 5369 | 5379 |
| 5370 | 5380 |
| 5371 void CodeGenerator::PushUnsafeSmi(Handle<Object> value) { | 5381 void CodeGenerator::PushUnsafeSmi(Handle<Object> value) { |
| 5372 ASSERT(value->IsSmi()); | 5382 ASSERT(value->IsSmi()); |
| 5373 int bits = reinterpret_cast<int>(*value); | 5383 int bits = reinterpret_cast<int>(*value); |
| 5374 __ push(Immediate(bits ^ jit_cookie_)); | 5384 __ push(Immediate(bits ^ jit_cookie_)); |
| 5375 __ xor_(Operand(esp, 0), Immediate(jit_cookie_)); | 5385 __ xor_(Operand(esp, 0), Immediate(jit_cookie_)); |
| 5376 } | 5386 } |
| (...skipping 4938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10315 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size); | 10325 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size); |
| 10316 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size); | 10326 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size); |
| 10317 return FUNCTION_CAST<MemCopyFunction>(chunk->GetStartAddress()); | 10327 return FUNCTION_CAST<MemCopyFunction>(chunk->GetStartAddress()); |
| 10318 } | 10328 } |
| 10319 | 10329 |
| 10320 #undef __ | 10330 #undef __ |
| 10321 | 10331 |
| 10322 } } // namespace v8::internal | 10332 } } // namespace v8::internal |
| 10323 | 10333 |
| 10324 #endif // V8_TARGET_ARCH_IA32 | 10334 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |