| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1291 | 1291 |
| 1292 | 1292 |
| 1293 void MacroAssembler::InvokeFunction(Register fun, | 1293 void MacroAssembler::InvokeFunction(Register fun, |
| 1294 const ParameterCount& actual, | 1294 const ParameterCount& actual, |
| 1295 InvokeFlag flag) { | 1295 InvokeFlag flag) { |
| 1296 ASSERT(fun.is(edi)); | 1296 ASSERT(fun.is(edi)); |
| 1297 mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); | 1297 mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
| 1298 mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); | 1298 mov(esi, FieldOperand(edi, JSFunction::kContextOffset)); |
| 1299 mov(ebx, FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset)); | 1299 mov(ebx, FieldOperand(edx, SharedFunctionInfo::kFormalParameterCountOffset)); |
| 1300 SmiUntag(ebx); | 1300 SmiUntag(ebx); |
| 1301 mov(edx, FieldOperand(edx, SharedFunctionInfo::kCodeOffset)); | 1301 mov(edx, FieldOperand(edi, JSFunction::kCodeOffset)); |
| 1302 lea(edx, FieldOperand(edx, Code::kHeaderSize)); | 1302 lea(edx, FieldOperand(edx, Code::kHeaderSize)); |
| 1303 | 1303 |
| 1304 ParameterCount expected(ebx); | 1304 ParameterCount expected(ebx); |
| 1305 InvokeCode(Operand(edx), expected, actual, flag); | 1305 InvokeCode(Operand(edx), expected, actual, flag); |
| 1306 } | 1306 } |
| 1307 | 1307 |
| 1308 | 1308 |
| 1309 void MacroAssembler::InvokeFunction(JSFunction* function, | 1309 void MacroAssembler::InvokeFunction(JSFunction* function, |
| 1310 const ParameterCount& actual, | 1310 const ParameterCount& actual, |
| 1311 InvokeFlag flag) { | 1311 InvokeFlag flag) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1343 | 1343 |
| 1344 // Load the JavaScript builtin function from the builtins object. | 1344 // Load the JavaScript builtin function from the builtins object. |
| 1345 mov(edi, FieldOperand(target, JSBuiltinsObject::OffsetOfFunctionWithId(id))); | 1345 mov(edi, FieldOperand(target, JSBuiltinsObject::OffsetOfFunctionWithId(id))); |
| 1346 | 1346 |
| 1347 // Load the code entry point from the builtins object. | 1347 // Load the code entry point from the builtins object. |
| 1348 mov(target, FieldOperand(target, JSBuiltinsObject::OffsetOfCodeWithId(id))); | 1348 mov(target, FieldOperand(target, JSBuiltinsObject::OffsetOfCodeWithId(id))); |
| 1349 if (FLAG_debug_code) { | 1349 if (FLAG_debug_code) { |
| 1350 // Make sure the code objects in the builtins object and in the | 1350 // Make sure the code objects in the builtins object and in the |
| 1351 // builtin function are the same. | 1351 // builtin function are the same. |
| 1352 push(target); | 1352 push(target); |
| 1353 mov(target, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); | 1353 mov(target, FieldOperand(edi, JSFunction::kCodeOffset)); |
| 1354 mov(target, FieldOperand(target, SharedFunctionInfo::kCodeOffset)); | |
| 1355 cmp(target, Operand(esp, 0)); | 1354 cmp(target, Operand(esp, 0)); |
| 1356 Assert(equal, "Builtin code object changed"); | 1355 Assert(equal, "Builtin code object changed"); |
| 1357 pop(target); | 1356 pop(target); |
| 1358 } | 1357 } |
| 1359 lea(target, FieldOperand(target, Code::kHeaderSize)); | 1358 lea(target, FieldOperand(target, Code::kHeaderSize)); |
| 1360 } | 1359 } |
| 1361 | 1360 |
| 1362 | 1361 |
| 1363 void MacroAssembler::LoadContext(Register dst, int context_chain_length) { | 1362 void MacroAssembler::LoadContext(Register dst, int context_chain_length) { |
| 1364 if (context_chain_length > 0) { | 1363 if (context_chain_length > 0) { |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1672 | 1671 |
| 1673 // Check that the code was patched as expected. | 1672 // Check that the code was patched as expected. |
| 1674 ASSERT(masm_.pc_ == address_ + size_); | 1673 ASSERT(masm_.pc_ == address_ + size_); |
| 1675 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 1674 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 1676 } | 1675 } |
| 1677 | 1676 |
| 1678 | 1677 |
| 1679 } } // namespace v8::internal | 1678 } } // namespace v8::internal |
| 1680 | 1679 |
| 1681 #endif // V8_TARGET_ARCH_IA32 | 1680 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |