OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 344 |
345 | 345 |
346 const AccessorDescriptor Accessors::ScriptColumnOffset = { | 346 const AccessorDescriptor Accessors::ScriptColumnOffset = { |
347 ScriptGetColumnOffset, | 347 ScriptGetColumnOffset, |
348 IllegalSetter, | 348 IllegalSetter, |
349 0 | 349 0 |
350 }; | 350 }; |
351 | 351 |
352 | 352 |
353 // | 353 // |
354 // Accessors::ScriptData | |
355 // | |
356 | |
357 | |
358 MaybeObject* Accessors::ScriptGetData(Isolate* isolate, | |
359 Object* object, | |
360 void*) { | |
361 Object* script = JSValue::cast(object)->value(); | |
362 return Script::cast(script)->data(); | |
363 } | |
364 | |
365 | |
366 const AccessorDescriptor Accessors::ScriptData = { | |
367 ScriptGetData, | |
368 IllegalSetter, | |
369 0 | |
370 }; | |
371 | |
372 | |
373 // | |
374 // Accessors::ScriptType | 354 // Accessors::ScriptType |
375 // | 355 // |
376 | 356 |
377 | 357 |
378 MaybeObject* Accessors::ScriptGetType(Isolate* isolate, | 358 MaybeObject* Accessors::ScriptGetType(Isolate* isolate, |
379 Object* object, | 359 Object* object, |
380 void*) { | 360 void*) { |
381 Object* script = JSValue::cast(object)->value(); | 361 Object* script = JSValue::cast(object)->value(); |
382 return Script::cast(script)->type(); | 362 return Script::cast(script)->type(); |
383 } | 363 } |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 info->set_data(Smi::FromInt(index)); | 968 info->set_data(Smi::FromInt(index)); |
989 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); | 969 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); |
990 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); | 970 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); |
991 info->set_getter(*getter); | 971 info->set_getter(*getter); |
992 if (!(attributes & ReadOnly)) info->set_setter(*setter); | 972 if (!(attributes & ReadOnly)) info->set_setter(*setter); |
993 return info; | 973 return info; |
994 } | 974 } |
995 | 975 |
996 | 976 |
997 } } // namespace v8::internal | 977 } } // namespace v8::internal |
OLD | NEW |