OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 // Non-instance prototype: Fetch prototype from constructor field | 1097 // Non-instance prototype: Fetch prototype from constructor field |
1098 // in initial map. | 1098 // in initial map. |
1099 bind(&non_instance); | 1099 bind(&non_instance); |
1100 mov(result, FieldOperand(result, Map::kConstructorOffset)); | 1100 mov(result, FieldOperand(result, Map::kConstructorOffset)); |
1101 | 1101 |
1102 // All done. | 1102 // All done. |
1103 bind(&done); | 1103 bind(&done); |
1104 } | 1104 } |
1105 | 1105 |
1106 | 1106 |
1107 void MacroAssembler::CallStub(CodeStub* stub) { | 1107 void MacroAssembler::CallStub(CodeStub* stub, unsigned ast_id) { |
1108 ASSERT(allow_stub_calls()); // Calls are not allowed in some stubs. | 1108 ASSERT(allow_stub_calls()); // Calls are not allowed in some stubs. |
1109 call(stub->GetCode(), RelocInfo::CODE_TARGET); | 1109 call(stub->GetCode(), RelocInfo::CODE_TARGET, ast_id); |
1110 } | 1110 } |
1111 | 1111 |
1112 | 1112 |
1113 MaybeObject* MacroAssembler::TryCallStub(CodeStub* stub) { | 1113 MaybeObject* MacroAssembler::TryCallStub(CodeStub* stub) { |
1114 ASSERT(allow_stub_calls()); // Calls are not allowed in some stubs. | 1114 ASSERT(allow_stub_calls()); // Calls are not allowed in some stubs. |
1115 Object* result; | 1115 Object* result; |
1116 { MaybeObject* maybe_result = stub->TryGetCode(); | 1116 { MaybeObject* maybe_result = stub->TryGetCode(); |
1117 if (!maybe_result->ToObject(&result)) return maybe_result; | 1117 if (!maybe_result->ToObject(&result)) return maybe_result; |
1118 } | 1118 } |
1119 call(Handle<Code>(Code::cast(result)), RelocInfo::CODE_TARGET); | 1119 call(Handle<Code>(Code::cast(result)), RelocInfo::CODE_TARGET); |
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2034 | 2034 |
2035 // Check that the code was patched as expected. | 2035 // Check that the code was patched as expected. |
2036 ASSERT(masm_.pc_ == address_ + size_); | 2036 ASSERT(masm_.pc_ == address_ + size_); |
2037 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 2037 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
2038 } | 2038 } |
2039 | 2039 |
2040 | 2040 |
2041 } } // namespace v8::internal | 2041 } } // namespace v8::internal |
2042 | 2042 |
2043 #endif // V8_TARGET_ARCH_IA32 | 2043 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |