OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 static StaticResource<StringInputBuffer> string_input_buffer; | 87 static StaticResource<StringInputBuffer> string_input_buffer; |
88 | 88 |
89 | 89 |
90 static Object* IllegalOperation() { | 90 static Object* IllegalOperation() { |
91 return Top::Throw(Heap::illegal_access_symbol()); | 91 return Top::Throw(Heap::illegal_access_symbol()); |
92 } | 92 } |
93 | 93 |
94 | 94 |
95 static Object* Runtime_CloneObjectLiteralBoilerplate(Arguments args) { | 95 static Object* Runtime_CloneObjectLiteralBoilerplate(Arguments args) { |
96 CONVERT_CHECKED(JSObject, boilerplate, args[0]); | 96 CONVERT_CHECKED(JSObject, boilerplate, args[0]); |
97 return boilerplate->Copy(); | 97 return Heap::CopyJSObject(boilerplate); |
98 } | 98 } |
99 | 99 |
100 | 100 |
101 static Handle<Map> ComputeObjectLiteralMap( | 101 static Handle<Map> ComputeObjectLiteralMap( |
102 Handle<Context> context, | 102 Handle<Context> context, |
103 Handle<FixedArray> constant_properties, | 103 Handle<FixedArray> constant_properties, |
104 bool &is_result_from_cache) { | 104 bool &is_result_from_cache) { |
105 if (FLAG_canonicalize_object_literal_maps) { | 105 if (FLAG_canonicalize_object_literal_maps) { |
106 // First find prefix of consecutive symbol keys. | 106 // First find prefix of consecutive symbol keys. |
107 int number_of_properties = constant_properties->length()/2; | 107 int number_of_properties = constant_properties->length()/2; |
(...skipping 5345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5453 | 5453 |
5454 void Runtime::PerformGC(Object* result) { | 5454 void Runtime::PerformGC(Object* result) { |
5455 Failure* failure = Failure::cast(result); | 5455 Failure* failure = Failure::cast(result); |
5456 // Try to do a garbage collection; ignore it if it fails. The C | 5456 // Try to do a garbage collection; ignore it if it fails. The C |
5457 // entry stub will throw an out-of-memory exception in that case. | 5457 // entry stub will throw an out-of-memory exception in that case. |
5458 Heap::CollectGarbage(failure->requested(), failure->allocation_space()); | 5458 Heap::CollectGarbage(failure->requested(), failure->allocation_space()); |
5459 } | 5459 } |
5460 | 5460 |
5461 | 5461 |
5462 } } // namespace v8::internal | 5462 } } // namespace v8::internal |
OLD | NEW |