| Index: src/factory.h
|
| ===================================================================
|
| --- src/factory.h (revision 8618)
|
| +++ src/factory.h (working copy)
|
| @@ -1,4 +1,4 @@
|
| -// Copyright 2010 the V8 project authors. All rights reserved.
|
| +// Copyright 2011 the V8 project authors. All rights reserved.
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| // met:
|
| @@ -39,7 +39,7 @@
|
|
|
| class Factory {
|
| public:
|
| - // Allocate a new fixed array with undefined entries.
|
| + // Allocate a new uninitialized fixed array.
|
| Handle<FixedArray> NewFixedArray(
|
| int size,
|
| PretenureFlag pretenure = NOT_TENURED);
|
| @@ -49,6 +49,11 @@
|
| int size,
|
| PretenureFlag pretenure = NOT_TENURED);
|
|
|
| + // Allocate a new uninitialized fixed double array.
|
| + Handle<FixedArray> NewFixedDoubleArray(
|
| + int size,
|
| + PretenureFlag pretenure = NOT_TENURED);
|
| +
|
| Handle<NumberDictionary> NewNumberDictionary(int at_least_space_for);
|
|
|
| Handle<StringDictionary> NewStringDictionary(int at_least_space_for);
|
| @@ -112,10 +117,10 @@
|
| // Allocates and partially initializes an ASCII or TwoByte String. The
|
| // characters of the string are uninitialized. Currently used in regexp code
|
| // only, where they are pretenured.
|
| - Handle<String> NewRawAsciiString(
|
| + Handle<SeqAsciiString> NewRawAsciiString(
|
| int length,
|
| PretenureFlag pretenure = NOT_TENURED);
|
| - Handle<String> NewRawTwoByteString(
|
| + Handle<SeqTwoByteString> NewRawTwoByteString(
|
| int length,
|
| PretenureFlag pretenure = NOT_TENURED);
|
|
|
| @@ -128,6 +133,11 @@
|
| int begin,
|
| int end);
|
|
|
| + // Create a new string object which holds a proper substring of a string.
|
| + Handle<String> NewProperSubString(Handle<String> str,
|
| + int begin,
|
| + int end);
|
| +
|
| // Creates a new external String object. There are two String encodings
|
| // in the system: ASCII and two byte. Unlike other String types, it does
|
| // not make sense to have a UTF-8 factory function for external strings,
|
| @@ -142,12 +152,18 @@
|
|
|
| // Create a function context.
|
| Handle<Context> NewFunctionContext(int length,
|
| - Handle<JSFunction> closure);
|
| + Handle<JSFunction> function);
|
|
|
| + // Create a catch context.
|
| + Handle<Context> NewCatchContext(Handle<JSFunction> function,
|
| + Handle<Context> previous,
|
| + Handle<String> name,
|
| + Handle<Object> thrown_object);
|
| +
|
| // Create a 'with' context.
|
| - Handle<Context> NewWithContext(Handle<Context> previous,
|
| - Handle<JSObject> extension,
|
| - bool is_catch_context);
|
| + Handle<Context> NewWithContext(Handle<JSFunction> function,
|
| + Handle<Context> previous,
|
| + Handle<JSObject> extension);
|
|
|
| // Return the Symbol matching the passed in string.
|
| Handle<String> SymbolFromString(Handle<String> value);
|
|
|