Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: src/api.cc

Issue 8226017: Introduce collective --harmony flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/arm/full-codegen-arm.cc » ('j') | src/v8.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 Utils::OpenHandle(this)->set_internal_field_count(i::Smi::FromInt(value)); 1406 Utils::OpenHandle(this)->set_internal_field_count(i::Smi::FromInt(value));
1407 } 1407 }
1408 1408
1409 1409
1410 // --- S c r i p t D a t a --- 1410 // --- S c r i p t D a t a ---
1411 1411
1412 1412
1413 ScriptData* ScriptData::PreCompile(const char* input, int length) { 1413 ScriptData* ScriptData::PreCompile(const char* input, int length) {
1414 i::Utf8ToUC16CharacterStream stream( 1414 i::Utf8ToUC16CharacterStream stream(
1415 reinterpret_cast<const unsigned char*>(input), length); 1415 reinterpret_cast<const unsigned char*>(input), length);
1416 return i::ParserApi::PreParse(&stream, NULL, i::FLAG_harmony_block_scoping); 1416 return i::ParserApi::PreParse(&stream, NULL, i::FLAG_harmony_scoping);
1417 } 1417 }
1418 1418
1419 1419
1420 ScriptData* ScriptData::PreCompile(v8::Handle<String> source) { 1420 ScriptData* ScriptData::PreCompile(v8::Handle<String> source) {
1421 i::Handle<i::String> str = Utils::OpenHandle(*source); 1421 i::Handle<i::String> str = Utils::OpenHandle(*source);
1422 if (str->IsExternalTwoByteString()) { 1422 if (str->IsExternalTwoByteString()) {
1423 i::ExternalTwoByteStringUC16CharacterStream stream( 1423 i::ExternalTwoByteStringUC16CharacterStream stream(
1424 i::Handle<i::ExternalTwoByteString>::cast(str), 0, str->length()); 1424 i::Handle<i::ExternalTwoByteString>::cast(str), 0, str->length());
1425 return i::ParserApi::PreParse(&stream, NULL, i::FLAG_harmony_block_scoping); 1425 return i::ParserApi::PreParse(&stream, NULL, i::FLAG_harmony_scoping);
1426 } else { 1426 } else {
1427 i::GenericStringUC16CharacterStream stream(str, 0, str->length()); 1427 i::GenericStringUC16CharacterStream stream(str, 0, str->length());
1428 return i::ParserApi::PreParse(&stream, NULL, i::FLAG_harmony_block_scoping); 1428 return i::ParserApi::PreParse(&stream, NULL, i::FLAG_harmony_scoping);
1429 } 1429 }
1430 } 1430 }
1431 1431
1432 1432
1433 ScriptData* ScriptData::New(const char* data, int length) { 1433 ScriptData* ScriptData::New(const char* data, int length) {
1434 // Return an empty ScriptData if the length is obviously invalid. 1434 // Return an empty ScriptData if the length is obviously invalid.
1435 if (length % sizeof(unsigned) != 0) { 1435 if (length % sizeof(unsigned) != 0) {
1436 return new i::ScriptDataImpl(); 1436 return new i::ScriptDataImpl();
1437 } 1437 }
1438 1438
(...skipping 4626 matching lines...) Expand 10 before | Expand all | Expand 10 after
6065 6065
6066 6066
6067 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 6067 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
6068 HandleScopeImplementer* scope_implementer = 6068 HandleScopeImplementer* scope_implementer =
6069 reinterpret_cast<HandleScopeImplementer*>(storage); 6069 reinterpret_cast<HandleScopeImplementer*>(storage);
6070 scope_implementer->IterateThis(v); 6070 scope_implementer->IterateThis(v);
6071 return storage + ArchiveSpacePerThread(); 6071 return storage + ArchiveSpacePerThread();
6072 } 6072 }
6073 6073
6074 } } // namespace v8::internal 6074 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm/full-codegen-arm.cc » ('j') | src/v8.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698