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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 return true; | 45 return true; |
46 } | 46 } |
47 return false; | 47 return false; |
48 } | 48 } |
49 | 49 |
50 | 50 |
51 void CodeStub::GenerateCode(MacroAssembler* masm) { | 51 void CodeStub::GenerateCode(MacroAssembler* masm) { |
52 // Update the static counter each time a new code stub is generated. | 52 // Update the static counter each time a new code stub is generated. |
53 masm->isolate()->counters()->code_stubs()->Increment(); | 53 masm->isolate()->counters()->code_stubs()->Increment(); |
54 | 54 |
55 // Nested stubs are not allowed for leafs. | 55 // Nested stubs are not allowed for leaves. |
56 AllowStubCallsScope allow_scope(masm, AllowsStubCalls()); | 56 AllowStubCallsScope allow_scope(masm, false); |
57 | 57 |
58 // Generate the code for the stub. | 58 // Generate the code for the stub. |
59 masm->set_generating_stub(true); | 59 masm->set_generating_stub(true); |
| 60 NoCurrentFrameScope scope(masm); |
60 Generate(masm); | 61 Generate(masm); |
61 } | 62 } |
62 | 63 |
63 | 64 |
64 void CodeStub::RecordCodeGeneration(Code* code, MacroAssembler* masm) { | 65 void CodeStub::RecordCodeGeneration(Code* code, MacroAssembler* masm) { |
65 code->set_major_key(MajorKey()); | 66 code->set_major_key(MajorKey()); |
66 | 67 |
67 Isolate* isolate = masm->isolate(); | 68 Isolate* isolate = masm->isolate(); |
68 PROFILE(isolate, CodeCreateEvent(Logger::STUB_TAG, code, GetName())); | 69 PROFILE(isolate, CodeCreateEvent(Logger::STUB_TAG, code, GetName())); |
69 GDBJIT(AddCode(GDBJITInterface::STUB, GetName(), code)); | 70 GDBJIT(AddCode(GDBJITInterface::STUB, GetName(), code)); |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 KeyedLoadStubCompiler::GenerateLoadExternalArray(masm, array_type_); | 259 KeyedLoadStubCompiler::GenerateLoadExternalArray(masm, array_type_); |
259 } | 260 } |
260 | 261 |
261 | 262 |
262 void KeyedStoreExternalArrayStub::Generate(MacroAssembler* masm) { | 263 void KeyedStoreExternalArrayStub::Generate(MacroAssembler* masm) { |
263 KeyedStoreStubCompiler::GenerateStoreExternalArray(masm, array_type_); | 264 KeyedStoreStubCompiler::GenerateStoreExternalArray(masm, array_type_); |
264 } | 265 } |
265 | 266 |
266 | 267 |
267 } } // namespace v8::internal | 268 } } // namespace v8::internal |
OLD | NEW |