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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 110 |
111 | 111 |
112 void TransformToFastProperties(Handle<JSObject> object, | 112 void TransformToFastProperties(Handle<JSObject> object, |
113 int unused_property_fields) { | 113 int unused_property_fields) { |
114 CALL_HEAP_FUNCTION_VOID( | 114 CALL_HEAP_FUNCTION_VOID( |
115 object->TransformToFastProperties(unused_property_fields)); | 115 object->TransformToFastProperties(unused_property_fields)); |
116 } | 116 } |
117 | 117 |
118 | 118 |
119 void FlattenString(Handle<String> string) { | 119 void FlattenString(Handle<String> string) { |
120 if (string->IsFlat()) return; | 120 StringShape shape(*string); |
121 CALL_HEAP_FUNCTION_VOID(string->Flatten()); | 121 if (string->IsFlat(shape)) return; |
122 ASSERT(string->IsFlat()); | 122 CALL_HEAP_FUNCTION_VOID(string->Flatten(shape)); |
| 123 ASSERT(string->IsFlat(StringShape(*string))); |
123 } | 124 } |
124 | 125 |
125 | 126 |
126 Handle<Object> SetPrototype(Handle<JSFunction> function, | 127 Handle<Object> SetPrototype(Handle<JSFunction> function, |
127 Handle<Object> prototype) { | 128 Handle<Object> prototype) { |
128 CALL_HEAP_FUNCTION(Accessors::FunctionSetPrototype(*function, | 129 CALL_HEAP_FUNCTION(Accessors::FunctionSetPrototype(*function, |
129 *prototype, | 130 *prototype, |
130 NULL), | 131 NULL), |
131 Object); | 132 Object); |
132 } | 133 } |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 CALL_HEAP_FUNCTION(obj->DeleteProperty(*prop), Object); | 210 CALL_HEAP_FUNCTION(obj->DeleteProperty(*prop), Object); |
210 } | 211 } |
211 | 212 |
212 | 213 |
213 Handle<Object> LookupSingleCharacterStringFromCode(uint32_t index) { | 214 Handle<Object> LookupSingleCharacterStringFromCode(uint32_t index) { |
214 CALL_HEAP_FUNCTION(Heap::LookupSingleCharacterStringFromCode(index), Object); | 215 CALL_HEAP_FUNCTION(Heap::LookupSingleCharacterStringFromCode(index), Object); |
215 } | 216 } |
216 | 217 |
217 | 218 |
218 Handle<String> SubString(Handle<String> str, int start, int end) { | 219 Handle<String> SubString(Handle<String> str, int start, int end) { |
219 CALL_HEAP_FUNCTION(str->Slice(start, end), String); | 220 StringShape shape(*str); |
| 221 CALL_HEAP_FUNCTION(str->Slice(shape, start, end), String); |
220 } | 222 } |
221 | 223 |
222 | 224 |
223 Handle<Object> SetElement(Handle<JSObject> object, | 225 Handle<Object> SetElement(Handle<JSObject> object, |
224 uint32_t index, | 226 uint32_t index, |
225 Handle<Object> value) { | 227 Handle<Object> value) { |
226 CALL_HEAP_FUNCTION(object->SetElement(index, *value), Object); | 228 CALL_HEAP_FUNCTION(object->SetElement(index, *value), Object); |
227 } | 229 } |
228 | 230 |
229 | 231 |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 Handle<Context> compile_context, | 528 Handle<Context> compile_context, |
527 Handle<Context> function_context) { | 529 Handle<Context> function_context) { |
528 Handle<FixedArray> arr = Factory::NewFixedArray(3); | 530 Handle<FixedArray> arr = Factory::NewFixedArray(3); |
529 arr->set(0, Smi::FromInt(index)); | 531 arr->set(0, Smi::FromInt(index)); |
530 arr->set(1, *compile_context); // Compile in this context | 532 arr->set(1, *compile_context); // Compile in this context |
531 arr->set(2, *function_context); // Set function context to this | 533 arr->set(2, *function_context); // Set function context to this |
532 fun->shared()->set_lazy_load_data(*arr); | 534 fun->shared()->set_lazy_load_data(*arr); |
533 } | 535 } |
534 | 536 |
535 } } // namespace v8::internal | 537 } } // namespace v8::internal |
OLD | NEW |