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

Side by Side Diff: src/factory.h

Issue 181543002: Eliminate extended mode, and other modes clean-up (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/execution.cc ('k') | src/factory.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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 369
370 // Change the type of the argument into a JS object/function and reinitialize. 370 // Change the type of the argument into a JS object/function and reinitialize.
371 void BecomeJSObject(Handle<JSReceiver> object); 371 void BecomeJSObject(Handle<JSReceiver> object);
372 void BecomeJSFunction(Handle<JSReceiver> object); 372 void BecomeJSFunction(Handle<JSReceiver> object);
373 373
374 Handle<JSFunction> NewFunction(Handle<String> name, 374 Handle<JSFunction> NewFunction(Handle<String> name,
375 Handle<Object> prototype); 375 Handle<Object> prototype);
376 376
377 Handle<JSFunction> NewFunctionWithoutPrototype( 377 Handle<JSFunction> NewFunctionWithoutPrototype(
378 Handle<String> name, 378 Handle<String> name,
379 LanguageMode language_mode); 379 StrictMode strict_mode);
380 380
381 Handle<JSFunction> NewFunction(Handle<Object> super, bool is_global); 381 Handle<JSFunction> NewFunction(Handle<Object> super, bool is_global);
382 382
383 Handle<JSFunction> BaseNewFunctionFromSharedFunctionInfo( 383 Handle<JSFunction> BaseNewFunctionFromSharedFunctionInfo(
384 Handle<SharedFunctionInfo> function_info, 384 Handle<SharedFunctionInfo> function_info,
385 Handle<Map> function_map, 385 Handle<Map> function_map,
386 PretenureFlag pretenure); 386 PretenureFlag pretenure);
387 387
388 Handle<JSFunction> NewFunctionFromSharedFunctionInfo( 388 Handle<JSFunction> NewFunctionFromSharedFunctionInfo(
389 Handle<SharedFunctionInfo> function_info, 389 Handle<SharedFunctionInfo> function_info,
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 Handle<Object> ToBoolean(bool value); 571 Handle<Object> ToBoolean(bool value);
572 572
573 private: 573 private:
574 Isolate* isolate() { return reinterpret_cast<Isolate*>(this); } 574 Isolate* isolate() { return reinterpret_cast<Isolate*>(this); }
575 575
576 Handle<JSFunction> NewFunctionHelper(Handle<String> name, 576 Handle<JSFunction> NewFunctionHelper(Handle<String> name,
577 Handle<Object> prototype); 577 Handle<Object> prototype);
578 578
579 Handle<JSFunction> NewFunctionWithoutPrototypeHelper( 579 Handle<JSFunction> NewFunctionWithoutPrototypeHelper(
580 Handle<String> name, 580 Handle<String> name,
581 LanguageMode language_mode); 581 StrictMode strict_mode);
582 582
583 // Create a new map cache. 583 // Create a new map cache.
584 Handle<MapCache> NewMapCache(int at_least_space_for); 584 Handle<MapCache> NewMapCache(int at_least_space_for);
585 585
586 // Update the map cache in the native context with (keys, map) 586 // Update the map cache in the native context with (keys, map)
587 Handle<MapCache> AddToMapCache(Handle<Context> context, 587 Handle<MapCache> AddToMapCache(Handle<Context> context,
588 Handle<FixedArray> keys, 588 Handle<FixedArray> keys,
589 Handle<Map> map); 589 Handle<Map> map);
590 }; 590 };
591 591
592 592
593 Handle<Object> Factory::NewNumberFromSize(size_t value, 593 Handle<Object> Factory::NewNumberFromSize(size_t value,
594 PretenureFlag pretenure) { 594 PretenureFlag pretenure) {
595 if (Smi::IsValid(static_cast<intptr_t>(value))) { 595 if (Smi::IsValid(static_cast<intptr_t>(value))) {
596 return Handle<Object>(Smi::FromIntptr(static_cast<intptr_t>(value)), 596 return Handle<Object>(Smi::FromIntptr(static_cast<intptr_t>(value)),
597 isolate()); 597 isolate());
598 } else { 598 } else {
599 return NewNumber(static_cast<double>(value), pretenure); 599 return NewNumber(static_cast<double>(value), pretenure);
600 } 600 }
601 } 601 }
602 602
603 603
604 } } // namespace v8::internal 604 } } // namespace v8::internal
605 605
606 #endif // V8_FACTORY_H_ 606 #endif // V8_FACTORY_H_
OLDNEW
« no previous file with comments | « src/execution.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698