| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 17 matching lines...) Expand all Loading... |
| 28 #include "v8.h" | 28 #include "v8.h" |
| 29 | 29 |
| 30 #include "api.h" | 30 #include "api.h" |
| 31 | 31 |
| 32 #include "arguments.h" | 32 #include "arguments.h" |
| 33 #include "bootstrapper.h" | 33 #include "bootstrapper.h" |
| 34 #include "compiler.h" | 34 #include "compiler.h" |
| 35 #include "debug.h" | 35 #include "debug.h" |
| 36 #include "deoptimizer.h" | 36 #include "deoptimizer.h" |
| 37 #include "execution.h" | 37 #include "execution.h" |
| 38 #include "flags.h" |
| 38 #include "global-handles.h" | 39 #include "global-handles.h" |
| 39 #include "heap-profiler.h" | 40 #include "heap-profiler.h" |
| 40 #include "messages.h" | 41 #include "messages.h" |
| 41 #include "natives.h" | 42 #include "natives.h" |
| 42 #include "parser.h" | 43 #include "parser.h" |
| 43 #include "platform.h" | 44 #include "platform.h" |
| 44 #include "profile-generator-inl.h" | 45 #include "profile-generator-inl.h" |
| 45 #include "runtime-profiler.h" | 46 #include "runtime-profiler.h" |
| 46 #include "serialize.h" | 47 #include "serialize.h" |
| 47 #include "snapshot.h" | 48 #include "snapshot.h" |
| (...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1398 Utils::OpenHandle(this)->set_internal_field_count(i::Smi::FromInt(value)); | 1399 Utils::OpenHandle(this)->set_internal_field_count(i::Smi::FromInt(value)); |
| 1399 } | 1400 } |
| 1400 | 1401 |
| 1401 | 1402 |
| 1402 // --- S c r i p t D a t a --- | 1403 // --- S c r i p t D a t a --- |
| 1403 | 1404 |
| 1404 | 1405 |
| 1405 ScriptData* ScriptData::PreCompile(const char* input, int length) { | 1406 ScriptData* ScriptData::PreCompile(const char* input, int length) { |
| 1406 i::Utf8ToUC16CharacterStream stream( | 1407 i::Utf8ToUC16CharacterStream stream( |
| 1407 reinterpret_cast<const unsigned char*>(input), length); | 1408 reinterpret_cast<const unsigned char*>(input), length); |
| 1408 return i::ParserApi::PreParse(&stream, NULL); | 1409 return i::ParserApi::PreParse(&stream, NULL, i::FLAG_harmony_block_scoping); |
| 1409 } | 1410 } |
| 1410 | 1411 |
| 1411 | 1412 |
| 1412 ScriptData* ScriptData::PreCompile(v8::Handle<String> source) { | 1413 ScriptData* ScriptData::PreCompile(v8::Handle<String> source) { |
| 1413 i::Handle<i::String> str = Utils::OpenHandle(*source); | 1414 i::Handle<i::String> str = Utils::OpenHandle(*source); |
| 1414 if (str->IsExternalTwoByteString()) { | 1415 if (str->IsExternalTwoByteString()) { |
| 1415 i::ExternalTwoByteStringUC16CharacterStream stream( | 1416 i::ExternalTwoByteStringUC16CharacterStream stream( |
| 1416 i::Handle<i::ExternalTwoByteString>::cast(str), 0, str->length()); | 1417 i::Handle<i::ExternalTwoByteString>::cast(str), 0, str->length()); |
| 1417 return i::ParserApi::PreParse(&stream, NULL); | 1418 return i::ParserApi::PreParse(&stream, NULL, i::FLAG_harmony_block_scoping); |
| 1418 } else { | 1419 } else { |
| 1419 i::GenericStringUC16CharacterStream stream(str, 0, str->length()); | 1420 i::GenericStringUC16CharacterStream stream(str, 0, str->length()); |
| 1420 return i::ParserApi::PreParse(&stream, NULL); | 1421 return i::ParserApi::PreParse(&stream, NULL, i::FLAG_harmony_block_scoping); |
| 1421 } | 1422 } |
| 1422 } | 1423 } |
| 1423 | 1424 |
| 1424 | 1425 |
| 1425 ScriptData* ScriptData::New(const char* data, int length) { | 1426 ScriptData* ScriptData::New(const char* data, int length) { |
| 1426 // Return an empty ScriptData if the length is obviously invalid. | 1427 // Return an empty ScriptData if the length is obviously invalid. |
| 1427 if (length % sizeof(unsigned) != 0) { | 1428 if (length % sizeof(unsigned) != 0) { |
| 1428 return new i::ScriptDataImpl(); | 1429 return new i::ScriptDataImpl(); |
| 1429 } | 1430 } |
| 1430 | 1431 |
| (...skipping 4604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6035 | 6036 |
| 6036 | 6037 |
| 6037 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6038 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 6038 HandleScopeImplementer* scope_implementer = | 6039 HandleScopeImplementer* scope_implementer = |
| 6039 reinterpret_cast<HandleScopeImplementer*>(storage); | 6040 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 6040 scope_implementer->IterateThis(v); | 6041 scope_implementer->IterateThis(v); |
| 6041 return storage + ArchiveSpacePerThread(); | 6042 return storage + ArchiveSpacePerThread(); |
| 6042 } | 6043 } |
| 6043 | 6044 |
| 6044 } } // namespace v8::internal | 6045 } } // namespace v8::internal |
| OLD | NEW |