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 28 matching lines...) Expand all Loading... |
39 #include "debug.h" | 39 #include "debug.h" |
40 #include "execution.h" | 40 #include "execution.h" |
41 #include "jsregexp.h" | 41 #include "jsregexp.h" |
42 #include "platform.h" | 42 #include "platform.h" |
43 #include "runtime.h" | 43 #include "runtime.h" |
44 #include "scopeinfo.h" | 44 #include "scopeinfo.h" |
45 #include "v8threads.h" | 45 #include "v8threads.h" |
46 #include "smart-pointer.h" | 46 #include "smart-pointer.h" |
47 #include "parser.h" | 47 #include "parser.h" |
48 | 48 |
49 namespace v8 { namespace internal { | 49 namespace v8 { |
| 50 namespace internal { |
50 | 51 |
51 | 52 |
52 #define RUNTIME_ASSERT(value) do { \ | 53 #define RUNTIME_ASSERT(value) do { \ |
53 if (!(value)) return IllegalOperation(); \ | 54 if (!(value)) return IllegalOperation(); \ |
54 } while (false) | 55 } while (false) |
55 | 56 |
56 // Cast the given object to a value of the specified type and store | 57 // Cast the given object to a value of the specified type and store |
57 // it in a variable with the given name. If the object is not of the | 58 // it in a variable with the given name. If the object is not of the |
58 // expected type call IllegalOperation and return. | 59 // expected type call IllegalOperation and return. |
59 #define CONVERT_CHECKED(Type, name, obj) \ | 60 #define CONVERT_CHECKED(Type, name, obj) \ |
(...skipping 6977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7037 } else { | 7038 } else { |
7038 // Handle last resort GC and make sure to allow future allocations | 7039 // Handle last resort GC and make sure to allow future allocations |
7039 // to grow the heap without causing GCs (if possible). | 7040 // to grow the heap without causing GCs (if possible). |
7040 Counters::gc_last_resort_from_js.Increment(); | 7041 Counters::gc_last_resort_from_js.Increment(); |
7041 Heap::CollectAllGarbage(); | 7042 Heap::CollectAllGarbage(); |
7042 } | 7043 } |
7043 } | 7044 } |
7044 | 7045 |
7045 | 7046 |
7046 } } // namespace v8::internal | 7047 } } // namespace v8::internal |
OLD | NEW |