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

Side by Side Diff: src/bootstrapper.cc

Issue 11759008: Introduce ENABLE_LATIN_1 compile flag (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix FilterASCII Created 7 years, 11 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 | « src/bootstrapper.h ('k') | src/codegen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 factory->LookupOneByteSymbol(STATIC_ASCII_VECTOR("Empty")); 492 factory->LookupOneByteSymbol(STATIC_ASCII_VECTOR("Empty"));
493 Handle<JSFunction> empty_function = 493 Handle<JSFunction> empty_function =
494 factory->NewFunctionWithoutPrototype(symbol, CLASSIC_MODE); 494 factory->NewFunctionWithoutPrototype(symbol, CLASSIC_MODE);
495 495
496 // --- E m p t y --- 496 // --- E m p t y ---
497 Handle<Code> code = 497 Handle<Code> code =
498 Handle<Code>(isolate->builtins()->builtin( 498 Handle<Code>(isolate->builtins()->builtin(
499 Builtins::kEmptyFunction)); 499 Builtins::kEmptyFunction));
500 empty_function->set_code(*code); 500 empty_function->set_code(*code);
501 empty_function->shared()->set_code(*code); 501 empty_function->shared()->set_code(*code);
502 Handle<String> source = factory->NewStringFromAscii(CStrVector("() {}")); 502 Handle<String> source =
503 factory->NewStringFromOneByte(STATIC_ASCII_VECTOR("() {}"));
503 Handle<Script> script = factory->NewScript(source); 504 Handle<Script> script = factory->NewScript(source);
504 script->set_type(Smi::FromInt(Script::TYPE_NATIVE)); 505 script->set_type(Smi::FromInt(Script::TYPE_NATIVE));
505 empty_function->shared()->set_script(*script); 506 empty_function->shared()->set_script(*script);
506 empty_function->shared()->set_start_position(0); 507 empty_function->shared()->set_start_position(0);
507 empty_function->shared()->set_end_position(source->length()); 508 empty_function->shared()->set_end_position(source->length());
508 empty_function->shared()->DontAdaptArguments(); 509 empty_function->shared()->DontAdaptArguments();
509 510
510 // Set prototypes for the function maps. 511 // Set prototypes for the function maps.
511 native_context()->function_map()->set_prototype(*empty_function); 512 native_context()->function_map()->set_prototype(*empty_function);
512 native_context()->function_instance_map()->set_prototype(*empty_function); 513 native_context()->function_instance_map()->set_prototype(*empty_function);
(...skipping 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after
2428 return from + sizeof(NestingCounterType); 2429 return from + sizeof(NestingCounterType);
2429 } 2430 }
2430 2431
2431 2432
2432 // Called when the top-level V8 mutex is destroyed. 2433 // Called when the top-level V8 mutex is destroyed.
2433 void Bootstrapper::FreeThreadResources() { 2434 void Bootstrapper::FreeThreadResources() {
2434 ASSERT(!IsActive()); 2435 ASSERT(!IsActive());
2435 } 2436 }
2436 2437
2437 } } // namespace v8::internal 2438 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bootstrapper.h ('k') | src/codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698