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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 // new references. | 234 // new references. |
235 | 235 |
236 struct RefTableEntry { | 236 struct RefTableEntry { |
237 TypeCode type; | 237 TypeCode type; |
238 uint16_t id; | 238 uint16_t id; |
239 const char* name; | 239 const char* name; |
240 }; | 240 }; |
241 | 241 |
242 static const RefTableEntry ref_table[] = { | 242 static const RefTableEntry ref_table[] = { |
243 // Builtins | 243 // Builtins |
244 #define DEF_ENTRY_C(name) \ | 244 #define DEF_ENTRY_C(name, ignored) \ |
245 { C_BUILTIN, \ | 245 { C_BUILTIN, \ |
246 Builtins::c_##name, \ | 246 Builtins::c_##name, \ |
247 "Builtins::" #name }, | 247 "Builtins::" #name }, |
248 | 248 |
249 BUILTIN_LIST_C(DEF_ENTRY_C) | 249 BUILTIN_LIST_C(DEF_ENTRY_C) |
250 #undef DEF_ENTRY_C | 250 #undef DEF_ENTRY_C |
251 | 251 |
252 #define DEF_ENTRY_C(name) \ | 252 #define DEF_ENTRY_C(name, ignored) \ |
253 { BUILTIN, \ | 253 { BUILTIN, \ |
254 Builtins::name, \ | 254 Builtins::name, \ |
255 "Builtins::" #name }, | 255 "Builtins::" #name }, |
256 #define DEF_ENTRY_A(name, kind, state) DEF_ENTRY_C(name) | 256 #define DEF_ENTRY_A(name, kind, state) DEF_ENTRY_C(name, ignored) |
257 | 257 |
258 BUILTIN_LIST_C(DEF_ENTRY_C) | 258 BUILTIN_LIST_C(DEF_ENTRY_C) |
259 BUILTIN_LIST_A(DEF_ENTRY_A) | 259 BUILTIN_LIST_A(DEF_ENTRY_A) |
260 BUILTIN_LIST_DEBUG_A(DEF_ENTRY_A) | 260 BUILTIN_LIST_DEBUG_A(DEF_ENTRY_A) |
261 #undef DEF_ENTRY_C | 261 #undef DEF_ENTRY_C |
262 #undef DEF_ENTRY_A | 262 #undef DEF_ENTRY_A |
263 | 263 |
264 // Runtime functions | 264 // Runtime functions |
265 #define RUNTIME_ENTRY(name, nargs, ressize) \ | 265 #define RUNTIME_ENTRY(name, nargs, ressize) \ |
266 { RUNTIME_FUNCTION, \ | 266 { RUNTIME_FUNCTION, \ |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 Add(ExternalReference::perform_gc_function().address(), | 389 Add(ExternalReference::perform_gc_function().address(), |
390 RUNTIME_ENTRY, | 390 RUNTIME_ENTRY, |
391 1, | 391 1, |
392 "Runtime::PerformGC"); | 392 "Runtime::PerformGC"); |
393 Add(ExternalReference::random_positive_smi_function().address(), | 393 Add(ExternalReference::random_positive_smi_function().address(), |
394 RUNTIME_ENTRY, | 394 RUNTIME_ENTRY, |
395 2, | 395 2, |
396 "V8::RandomPositiveSmi"); | 396 "V8::RandomPositiveSmi"); |
397 | 397 |
398 // Miscellaneous | 398 // Miscellaneous |
399 Add(ExternalReference::builtin_passed_function().address(), | |
400 UNCLASSIFIED, | |
401 1, | |
402 "Builtins::builtin_passed_function"); | |
403 Add(ExternalReference::the_hole_value_location().address(), | 399 Add(ExternalReference::the_hole_value_location().address(), |
404 UNCLASSIFIED, | 400 UNCLASSIFIED, |
405 2, | 401 2, |
406 "Factory::the_hole_value().location()"); | 402 "Factory::the_hole_value().location()"); |
407 Add(ExternalReference::roots_address().address(), | 403 Add(ExternalReference::roots_address().address(), |
408 UNCLASSIFIED, | 404 UNCLASSIFIED, |
409 3, | 405 3, |
410 "Heap::roots_address()"); | 406 "Heap::roots_address()"); |
411 Add(ExternalReference::address_of_stack_limit().address(), | 407 Add(ExternalReference::address_of_stack_limit().address(), |
412 UNCLASSIFIED, | 408 UNCLASSIFIED, |
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1250 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); | 1246 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); |
1251 } | 1247 } |
1252 } | 1248 } |
1253 int allocation_address = fullness_[space]; | 1249 int allocation_address = fullness_[space]; |
1254 fullness_[space] = allocation_address + size; | 1250 fullness_[space] = allocation_address + size; |
1255 return allocation_address; | 1251 return allocation_address; |
1256 } | 1252 } |
1257 | 1253 |
1258 | 1254 |
1259 } } // namespace v8::internal | 1255 } } // namespace v8::internal |
OLD | NEW |