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 16 matching lines...) Expand all Loading... |
27 | 27 |
28 #include "v8.h" | 28 #include "v8.h" |
29 | 29 |
30 #include "scopes.h" | 30 #include "scopes.h" |
31 | 31 |
32 #include "bootstrapper.h" | 32 #include "bootstrapper.h" |
33 #include "compiler.h" | 33 #include "compiler.h" |
34 #include "prettyprinter.h" | 34 #include "prettyprinter.h" |
35 #include "scopeinfo.h" | 35 #include "scopeinfo.h" |
36 | 36 |
| 37 #include "allocation-inl.h" |
| 38 |
37 namespace v8 { | 39 namespace v8 { |
38 namespace internal { | 40 namespace internal { |
39 | 41 |
40 // ---------------------------------------------------------------------------- | 42 // ---------------------------------------------------------------------------- |
41 // A Zone allocator for use with LocalsMap. | 43 // A Zone allocator for use with LocalsMap. |
42 | 44 |
43 // TODO(isolates): It is probably worth it to change the Allocator class to | 45 // TODO(isolates): It is probably worth it to change the Allocator class to |
44 // take a pointer to an isolate. | 46 // take a pointer to an isolate. |
45 class ZoneAllocator: public Allocator { | 47 class ZoneAllocator: public Allocator { |
46 public: | 48 public: |
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 if (num_heap_slots_ == Context::MIN_CONTEXT_SLOTS && | 1090 if (num_heap_slots_ == Context::MIN_CONTEXT_SLOTS && |
1089 !must_have_local_context) { | 1091 !must_have_local_context) { |
1090 num_heap_slots_ = 0; | 1092 num_heap_slots_ = 0; |
1091 } | 1093 } |
1092 | 1094 |
1093 // Allocation done. | 1095 // Allocation done. |
1094 ASSERT(num_heap_slots_ == 0 || num_heap_slots_ >= Context::MIN_CONTEXT_SLOTS); | 1096 ASSERT(num_heap_slots_ == 0 || num_heap_slots_ >= Context::MIN_CONTEXT_SLOTS); |
1095 } | 1097 } |
1096 | 1098 |
1097 } } // namespace v8::internal | 1099 } } // namespace v8::internal |
OLD | NEW |