OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 V(ElementsTransitionAndStore) \ | 88 V(ElementsTransitionAndStore) \ |
89 V(TransitionElementsKind) \ | 89 V(TransitionElementsKind) \ |
90 V(StoreArrayLiteralElement) \ | 90 V(StoreArrayLiteralElement) \ |
91 V(StubFailureTrampoline) \ | 91 V(StubFailureTrampoline) \ |
92 V(ArrayConstructor) \ | 92 V(ArrayConstructor) \ |
93 V(InternalArrayConstructor) \ | 93 V(InternalArrayConstructor) \ |
94 V(ProfileEntryHook) \ | 94 V(ProfileEntryHook) \ |
95 V(StoreGlobal) \ | 95 V(StoreGlobal) \ |
96 /* IC Handler stubs */ \ | 96 /* IC Handler stubs */ \ |
97 V(LoadField) \ | 97 V(LoadField) \ |
98 V(KeyedLoadField) | 98 V(KeyedLoadField) \ |
| 99 V(RecordObjectAllocation) |
99 | 100 |
100 // List of code stubs only used on ARM platforms. | 101 // List of code stubs only used on ARM platforms. |
101 #if V8_TARGET_ARCH_ARM | 102 #if V8_TARGET_ARCH_ARM |
102 #define CODE_STUB_LIST_ARM(V) \ | 103 #define CODE_STUB_LIST_ARM(V) \ |
103 V(GetProperty) \ | 104 V(GetProperty) \ |
104 V(SetProperty) \ | 105 V(SetProperty) \ |
105 V(InvokeBuiltin) \ | 106 V(InvokeBuiltin) \ |
106 V(DirectCEntry) | 107 V(DirectCEntry) |
107 #else | 108 #else |
108 #define CODE_STUB_LIST_ARM(V) | 109 #define CODE_STUB_LIST_ARM(V) |
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1391 private: | 1392 private: |
1392 Major MajorKey() { return JSEntry; } | 1393 Major MajorKey() { return JSEntry; } |
1393 int MinorKey() { return 0; } | 1394 int MinorKey() { return 0; } |
1394 | 1395 |
1395 virtual void FinishCode(Handle<Code> code); | 1396 virtual void FinishCode(Handle<Code> code); |
1396 | 1397 |
1397 int handler_offset_; | 1398 int handler_offset_; |
1398 }; | 1399 }; |
1399 | 1400 |
1400 | 1401 |
| 1402 // Report JS object allocation to heap profiler if allocations tracking mode |
| 1403 // is on. |
| 1404 class RecordObjectAllocationStub : public PlatformCodeStub { |
| 1405 public: |
| 1406 RecordObjectAllocationStub() {} |
| 1407 |
| 1408 virtual void Generate(MacroAssembler* masm); |
| 1409 |
| 1410 private: |
| 1411 // This code stub never causes GC. |
| 1412 virtual bool SometimesSetsUpAFrame() { return false; } |
| 1413 |
| 1414 virtual Major MajorKey() { return RecordObjectAllocation; } |
| 1415 virtual int MinorKey() { return 0; } |
| 1416 |
| 1417 virtual void PrintName(StringStream* stream) { |
| 1418 stream->Add("RecordObjectAllocationStub"); |
| 1419 } |
| 1420 }; |
| 1421 |
| 1422 |
1401 class JSConstructEntryStub : public JSEntryStub { | 1423 class JSConstructEntryStub : public JSEntryStub { |
1402 public: | 1424 public: |
1403 JSConstructEntryStub() { } | 1425 JSConstructEntryStub() { } |
1404 | 1426 |
1405 void Generate(MacroAssembler* masm) { GenerateBody(masm, true); } | 1427 void Generate(MacroAssembler* masm) { GenerateBody(masm, true); } |
1406 | 1428 |
1407 private: | 1429 private: |
1408 int MinorKey() { return 1; } | 1430 int MinorKey() { return 1; } |
1409 | 1431 |
1410 virtual void PrintName(StringStream* stream) { | 1432 virtual void PrintName(StringStream* stream) { |
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2357 int MinorKey() { return 0; } | 2379 int MinorKey() { return 0; } |
2358 | 2380 |
2359 void Generate(MacroAssembler* masm); | 2381 void Generate(MacroAssembler* masm); |
2360 | 2382 |
2361 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); | 2383 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); |
2362 }; | 2384 }; |
2363 | 2385 |
2364 } } // namespace v8::internal | 2386 } } // namespace v8::internal |
2365 | 2387 |
2366 #endif // V8_CODE_STUBS_H_ | 2388 #endif // V8_CODE_STUBS_H_ |
OLD | NEW |